﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<link rel="Stylesheet" type="text/css" media="screen" href="Screen.css" />
	<title>StpCallback_DebugStrOut</title>
</head>
<body>
	<h3>StpCallback_DebugStrOut</h3>
	<hr />
	<pre>
void StpCallback_DebugStrOut
(
    BRIDGE*     bridge,
    int         portIndex,
    int         treeIndex,
    const char* str
);
</pre>
	<h4>Summary</h4>
	<p>
		Application-defined callback that processes debug text generated by the STP library. It 
		usually sends this text to a PC for displaying in a program such as Hyperterminal.
	</p>
	<p>
		<code>StpCallback_DebugStrOut</code> is a placeholder name used throughout this documentation. The 
		application may name this callback differently.</p>
	<h4>Parameters</h4>
	<dl>
		<dt>bridge</dt>
		<dd>The application receives in this parameter a pointer to the bridge object returned by
			<a href="STP_CreateBridge.html">STP_CreateBridge</a>.</dd>
		<dt>portIndex</dt>
		<dd>The application receives in this parameter either:
			<ul>
				<li>the zero-based index of a port, if the debug text is relevant only to that port, or</li>
				<li>-1 if the debug text is relevant to all ports (e.g., contains information about the 
					bridge).</li>
			</ul>
		</dd>
		<dt>treeIndex</dt>
		<dd>The application receives in this parameter either:
		<ul>
			<li>the zero-based index of a spanning tree, if the debug text is relevant only to 
				that spanning tree, or</li>
			<li>-1 if the debug text is relevant to all spanning trees.</li>
		</ul>
		</dd>
		<dt>str</dt>
		<dd>The application receives in this parameter a pointer to the null-terminated debug text.</dd>
	</dl>
	<h4>Remarks</h4>
	<p>
		The length of the debug text passed to this function, including the null terminator, is 
		lower than or equal to the <code>debugLogBufferSize</code> parameter specified in the call to 
		<a href="STP_CreateBridge.html">STP_CreateBridge</a>.</p>
	<p>
		Logging is enabled or disabled by calling <a href="STP_EnableLogging.html">
		STP_EnableLogging</a>. When a bridge is created, logging for that bridge is disabled.</p>
	<p>
		Line ending used by the STP library is &quot;\r\n&quot;.</p>
	
</body>
</html>
